const Router = require('koa-router');
const { BeSuccess } = require('../utils');
const { handleGetAllUser } = require('../services/user');

const router = new Router({ prefix: '/v1/user' });

router.get('/list', async (ctx, next) => {
  // const res = await handleGetAllUser();
  ctx.body = BeSuccess({ name: 'zs', age: 10 });
});

router.post('/add', async(ctx, next) => {
  const body = ctx.request.body;
  console.log(body);
  ctx.body = body
});

module.exports = router;